<template>
  <div id="zt_box" :style="{height: height}" @touchstart="start($event)" @touchmove="move($event)">
      <LSlide :data="data"/>
      <div style="height: 0.04rem;"></div>
      <router-view/>
  </div>
</template>
<script>
import LSlide from "./public/LSlide";
export default {
  data() {
    return {
      data: {
        simple: true,
        items: [
          {
            name: "全部",
            url: "/zt/"
          },
          {
            name: "节税专题",
            url: "/zt/105/"
          },
          {
            name: "社保专题",
            url: "/zt/106/"
          },
          {
            name: "残疾人就业专题",
            url: "/zt/107/"
          }
        ]
      },
      height: document.body.clientHeight + "px",
      clientY: 0
    };
  },
  components: {
    LSlide
  },
  methods: {
    start(e) {
      this.clientY = e.touches[0].clientY;
    },
    move(e) {
      if (this.clientY > e.touches[0].clientY) {
        this.$emit("order", {
          target: "title",
          type: 0
        });
      }
    }
  },
  activated() {
    this.$parent.tState = 1;
    this.$parent.fState = 0;
    this.$parent.updata();
  }
};
</script>
<style scoped>
#zt_box {
  overflow: scroll;
  width: 100%;
}
</style>
